{template header}


{template sidebar}

<!-- artile begin -->
<div class="article">
{template title}


<!--{if $a == 'index' || $a =='search'}-->

<form class="form-search" action="{$this->url($c, 'search', $this->get())}">
    <table>
        <tr><td class="td1" width="20%">商品编号：</td>
            <td>

                <div class="input-append">
                    <input type="text" name="key" class="span2 search-query" placeholder=""请输入商品编号 />
                    <button type="button" class="btn search">搜索</button>
                </div>
            </td >
        </tr>
    </table>

</form>


<table cellpadding="1" cellspacing="1" width="100%" border="0">



        <tr>
            <th width="5%"><input type="checkbox" class="checkbox all" /> </th>
            <th width="20%">商品编号</th>
            <th width="20%">宝贝货号</th>
            <th width="25%">当前状态</th>
            <th width="25%">操作</th>
        </tr>

        <!--{if  $result}-->
        <!--{loop $result $val}-->
        <tr>
            <th width="5%"><input type="checkbox" class="checkbox all" /> </th>
            <td>{$val['id']}</td>
            <td>{$val['materialNo']}</td>
            <td>{$val['goodsStatus']}</td>
            <td class="operate">
                <!--{if  $val['goodsStatus'] ==0}-->
                <a href="{$this->url($c,'editPrice',array('goodsNo'=>$val['id']))}">宝贝定价</a>
                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==1}-->
                <a href="{$this->url($c,'editAttr',array('goodsNo'=>$val['id']))}">自然属性</a>

                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==2}-->
                <a href="{$this->url($c,'editOrigPic',array('goodsNo'=>$val['id']))}">宝贝原图</a>
                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==3}-->
                <a href="{$this->url($c,'editGoodsName',array('goodsNo'=>$val['id']))}">宝贝命名</a>
                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==4}-->
                <a href="{$this->url($c,'editClothSize',array('goodsNo'=>$val['id']))}">宝贝尺寸表</a>
                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==5}-->
                <a href="{$this->url($c,'editPostPic',array('goodsNo'=>$val['id']))}">处理后图片</a>
                <!--{/if}-->
                <!--{if  $val['goodsStatus'] ==6}-->
                <a href="{$this->url($c,'editOnSaleDes',array('goodsNo'=>$val['id']))}">宝贝描述</a>
                <!--{/if}-->
            </td>
        </tr>

        <!--{/loop}-->

        <!--{else}-->
        <tr>

            <td colspan="4">没有数据记录文件！</td>

        </tr>
        <!--{/if}-->



    </table>

<!--{/if}-->


    <!--{if  $a == 'editAttr'}-->

    <form method="post" action="{$this->url($c, 'saveEditAttr', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <th colspan="2" class="td2">{$a == 'add' ? '添加' : '修改'}自然属性</th>
            </tr>
            <tr>
                <td class="td1">请选择模板类型：</td>
                <td class="td2">
                    <select name="templateId" onchange="template(this.value)">
                        <option value="1">模板一</option>
                        <option value="2">模板二</option>
                        <option value="3">模板三</option>
                    </select>
                    <script>
                        function template( v ) {
                            var url = "{$this->url($c,'editAttr',array('goodsNo'=>G('goodsNo')))}";
                            window.location.href = url + "&t=" + v;
                        }
                    </script>
                </td>
            </tr>

            <tr>
                <td class="td1">商品编号：</td>
                <td class="td2">
                    <input type="text" size="30" name="goodsNo" value="{$a == 'editAttr' ? $result['goodsNo'] : ''}" />
                </td>
            </tr>


            <tr>
                <td class="td1">弹力指数：</td>
                <td class="td2">
                    <select name="flexAttr" >
                        <option value="1">无弹</option>
                        <option value="2">微弹</option>
                        <option value="3">适中</option>
                        <option value="2">弹力</option>
                        <option value="3">超弹</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="td1">厚度指数：</td>
                <td class="td2">
                    <select name="thickness" >
                        <option value="1">薄</option>
                        <option value="2">稍薄</option>
                        <option value="3">适中</option>
                        <option value="2">稍厚</option>
                        <option value="3">厚</option>
                    </select>
                </td>
            </tr>


            <tr>
                <td class="td1">可选颜色：</td>
                <td class="td2" colspan="4">
                    <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->
                    <input type="checkbox"  name="color[]" value="1" />黄色
                    <input type="checkbox"  name="color[]" value="2" />卡其色
                    <input type="checkbox"  name="color[]" value="3" />蓝色
                    <input type="checkbox"  name="color[]" value="4" />红色
                    <input type="checkbox"  name="color[]" value="5" />粉红色
                    <input type="checkbox"  name="color[]" value="6" />绿色
                </td>
            </tr>
            <tr>
                <td class="td1">可选尺寸：</td>
                <td class="td2" colspan="4">
                    <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->
                    <input type="checkbox" name="size[]" value="1" />95cm
                    <input type="checkbox" name="size[]" value="2" />100cm
                    <input type="checkbox" name="size[]" value="3" />105cm
                    <input type="checkbox" name="size[]" value="4" />110cm
                    <input type="checkbox" name="size[]" value="5" />115cm
                    <input type="checkbox" name="size[]" value="6"/>120cm
                </td>
            </tr>
            <tr>
                <td class="td1">质地指数：</td>
                <td class="td2">
                    <select name="texture" >
                        <option value="1">柔软</option>
                        <option value="2">偏软</option>
                        <option value="3">适中</option>
                        <option value="4">偏硬</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="td1">版型：</td>
                <td class="td2">
                    <select name="style" >
                        <option value="1">宽松</option>
                        <option value="2">合身</option>
                        <option value="3">修身</option>
                        <option value="4">紧身</option>
                    </select>
                </td>
            </tr>

            <tr>
                <td class="td1">风格：</td>
                <td class="td2">
                    <select name="clothStyle" >
                        <option value="1">清新</option>
                        <option value="2">可爱</option>
                        <option value="3">酷炫</option>
                        <option value="4">运动</option>
                        <option value="5">时尚</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="td1">图案：</td>
                <td class="td2">
                    <select name="picType" >
                        <option value="1">小熊</option>
                        <option value="2">米老鼠</option>
                        <option value="3">豹纹</option>
                        <option value="4">长格</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="td1">品牌：</td>
                <td class="td2">
                    <select name="brandName" >
                        <option value="1">唛尔奇</option>
                        <option value="2">布鲁莎莎</option>
                    </select>
                </td>
            </tr>

            <tr>
                <td class="td1">服装类型：</td>
                <td class="td2">
                    <select name="clothType" >
                        <option value="1">连衣裙</option>
                        <option value="2">牛仔裤</option>
                    </select>
                </td>
            </tr>
            <!--{if G('t', 1) == 1}-->
            <!--{/if}-->
            <tr>
                <td colspan="2" class="td4">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
            </tr>
        </table>
    </form>

    <!--{/if}-->

<!--{if  $a == 'editClothSize'}-->
<form method="post" action="{$this->url($c, 'saveEditClothSize', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2">{$a == 'add' ? '添加' : '修改'}自然属性</th>
        </tr>
        <tr>
            <td class="td1">请选择模板类型：</td>
            <td class="td2">
                <select name="templateId" onchange="template(this.value)">
                    <option value="1"  {echo 1 == $result['t'] ? 'selected':''}>T恤</option>
                    <option value="2" {echo 2 == $result['t']  ? 'selected':''}>连衣裙</option>
                    <option value="3" {echo 3 == $result['t']  ? 'selected':''}>裤子</option>
                    <option value="4" {echo 4 == $result['t']  ? 'selected':''}>上衣</option>
                    <option value="5" {echo 5 == $result['t']  ? 'selected':''}>半身裙</option>
                    <option value="6" {echo 6 == $result['t']  ? 'selected':''}>短裤</option>
                </select>
                <script>
                    function template( v ) {
                        var url = "{$this->url($c,'editClothSize',array('goodsNo'=>G('goodsNo')))}";
                        window.location.href = url + "&t=" + v;
                    }
                </script>
            </td>
        </tr>

        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" size="30" name="goodsNo" value="{$a == 'editClothSize' ? $result['goodsNo'] : ''}" />
            </td>
        </tr>

        <!--{if G('t', 1) == 1}-->
        <tr>
            <td class="td1">肩宽：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">领宽：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">衣长：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
            <td class="td1">袖长：</td>
            <td class="td2">
                <input type="text" size="30" name="size4" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">胸围：</td>
            <td class="td2">
                <input type="text" size="30" name="size5" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
            </td>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size6" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <!--{if G('t', 1) == 2}-->
        <tr>
            <td class="td1">肩宽：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">胸围：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">衣长：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
            <td class="td1">袖长：</td>
            <td class="td2">
                <input type="text" size="30" name="size4" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">臀围：</td>
            <td class="td2">
                <input type="text" size="30" name="size5" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
            </td>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size6" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <!--{if G('t', 1) == 3}-->
        <tr>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">臀围：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">腿围：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
            <td class="td1">脚围：</td>
            <td class="td2">
                <input type="text" size="30" name="size4" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">裤长：</td>
            <td class="td2">
                <input type="text" size="30" name="size5" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
            </td>
            <td class="td1">前档：</td>
            <td class="td2">
                <input type="text" size="30" name="size6" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <!--{if G('t', 1) == 4}-->
        <tr>
            <td class="td1">肩宽：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">胸围：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">衣长：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
            <td class="td1">袖长：</td>
            <td class="td2">
                <input type="text" size="30" name="size4" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size5" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <!--{if G('t', 1) == 5}-->
        <tr>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">臀围：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">裙长：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <!--{if G('t', 1) == 6}-->
        <tr>
            <td class="td1">腰围：</td>
            <td class="td2">
                <input type="text" size="30" name="size1" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
            </td>
            <td class="td1">臀围：</td>
            <td class="td2">
                <input type="text" size="30" name="size2" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td1">腿围：</td>
            <td class="td2">
                <input type="text" size="30" name="size3" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
            </td>
            <td class="td1">裤长：</td>
            <td class="td2">
                <input type="text" size="30" name="size4" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
            </td>
        </tr>
        <!--{/if}-->
        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>

<!--{/if}-->



<!--{if  $a == 'editGoodsName'}-->
    <form method="post" action="{$this->url($c, 'saveGoodsName', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <th colspan="6" class="td2">宝贝名称编辑</th>
            </tr>
            <tr>
                <td class="td1">商品编号：</td>
                <td class="td2">
                    <input type="text" size="30" name="goodsNo" value="{$a == 'editGoodsName' ? $result['goodsNo'] : ''}" />
                </td>
            </tr>
            <tr>
                <td class="td1">商品属性：</td>
                <td class="td2" colspan="4">
                    <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->
                    <input type="checkbox"  name="goodsAttr[]" value="1"  />服装类型
                    <input type="checkbox"  name="goodsAttr[]" value="2" />品牌类型
                    <input type="checkbox"  name="goodsAttr[]" value="3" />图案类型
                    <input type="checkbox"  name="goodsAttr[]" value="4" />厚度指数
                    <input type="checkbox"  name="goodsAttr[]" value="5" />弹力指数
                    <input type="checkbox"  name="goodsAttr[]" value="6" />版型
                </td>
            </tr>
            <tr>
                <td class="td1">促销关键字</td>
                <td class="td2" colspan="4">
                <select name="proKey" >
                    <option value="1">反季促销</option>
                    <option value="2">新店促销</option>
                    <option value="3">清仓促销</option>
                    <option value="4">秋冬新品</option>
                    <option value="5">春夏新装</option>
                    <option value="6">包邮促销</option>
                </select>
                </td>
            </tr>



            <tr>
                <td colspan="2" class="td4">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
            </tr>
        </table>
    </form>
<!--{/if}-->


<!--{if  $a == 'editPrice'}-->
<form method="post" action="{$this->url($c, 'saveEditPrice', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2">{$a == 'add' ? '添加' : '修改'}用户</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']}"/>
            </td>
        </tr>
        <tr>
            <td class="td1">最低销售价：</td>
            <td class="td2">
                <input type="text" name="lowestPrice" value="{$result['lowestPrice']} "/>
            </td>
        </tr>

        <tr>
            <td class="td1">亲情价：</td>
            <td class="td2">
                <input type="text" name="friendPrice" value="{$result['friendPrice']}  "/>
            </td>
        </tr>

        <tr>
            <td class="td1">促销价：</td>
            <td class="td2">
                <input type="text" name="proSalePrice" value="{$result['proSalePrice']} "/>
            </td>
        </tr>

        <tr>
            <td class="td1">网络销售价：</td>
            <td class="td2">
                <input type="text" name="markPrice" value="{$result['markPrice']}" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->



<!--{if  $a == 'editOrigPic'}-->
<form method="post" enctype="multipart/form-data" action="{$this->url($c, 'saveEditOrigPic', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2">{$a == 'add' ? '添加' : '修改'}用户</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']} " />
            </td>
        </tr>
        <tr>
            <td class="td1"><label for="file">文件名称:</label></td>
            <td class="td2">
                <input type="file" name="prePicfile" id="file" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <!-- <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>-->
                <input type="submit" name="submit" value="上传" >
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->

<!--{if  $a == 'editPostPic'}-->
<form method="post" enctype="multipart/form-data" action="{$this->url($c, 'saveEditPostPic', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2">{$a == 'add' ? '添加' : '修改'}用户</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']} " />
            </td>
        </tr>
        <tr>
            <td class="td1"><label for="file">文件名称:</label></td>
            <td class="td2">
                <input type="file" name="postPicfile" id="postPicfile" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <!-- <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>-->
                <input type="submit" name="submit" value="上传" >
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->

<!--{if  $a == 'editOnSaleDes'}-->
<form method="post" action="{$this->url($c, 'saveEditOnSaleDes', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2">宝贝描述</th>
        </tr>

        <tr>
            <th colspan="2" class="td2">商品编号</th>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$goodsNo}" />
            </td>
        </tr>

        <!--{loop $result $k $v}-->
        <tr>
            <td class="td2" colspan=" 4">{$v}：</td>

        </tr>
        <tr>
            <td class="td2">图片1地址:   </td>
            <td class="td2">
                <input type="text" name="pic{$k}1" value="{$a == 'edit' && $result['goodsNo'] ? ' checked' : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td2">图片2地址:   </td>
            <td class="td2">
                <input type="text" name="pic{$k}2" value="{$a == 'edit' && $result['goodsNo'] ? ' checked' : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td2">图片3地址:   </td>
            <td class="td2">
                <input type="text" name="pic{$k}3" value="{$a == 'edit' && $result['goodsNo'] ? ' checked' : ''}" />
            </td>
        </tr>
        <tr>
            <td class="td2">图片4地址:   </td>
            <td class="td2">
                <input type="text" name="pic{$k}4" value="{$a == 'edit' && $result['goodsNo'] ? ' checked' : ''}" />
            </td>
        </tr>
        <!--{/if}-->

        <tr>
            <td colspan="4" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->













</div>
<!-- artile end -->
{template footer}